Fields Property (Folder Object) 

The Fields property returns a single Field19WJLQ9 object or a Fields0EU12H collection object. Read-only.

Syntax

objFolder.Fields

objFolder.Fields(index)

objFolder.Fields(proptag)

objFolder.Fields(name)

index

Short integer (less than or equal to 65535). Specifies the index within the collection.

proptag

Long integer (greater than or equal to 65536). Specifies the property tag value for the MAPI property to be retrieved.

name

String. Specifies the name of the custom MAPI property.

 

Data Type

Object

Remarks

The Fields property returns one or more of the fields associated with a Folder object. Each field typically corresponds to a MAPI property.

The Fields property provides a generic access mechanism that allows Visual Basic and Visual C++ programmers to retrieve the value of a MAPI property using either its name or its MAPI property tag. For access with the property tag, use Folder.Fields(proptag), where proptag is the 32-bit MAPI property tag associated with the property, such as PR_MESSAGE_CLASS. To access a named property, use Folder.Fields(name), where name is a string that represents the custom property name.

Example

This example displays the field name or identifier value of all Field objects within the collection:

' many properties are MAPI properties and have no names

' for those properties, display the ID

' fragment from Field_Name

' assume objFieldColl, objOneField are valid objects

For i = 1 to objFieldColl.Count Step 1

    Set objOneField = objFieldColl.Index(i)

    If "" = objOneField.Name Then

        MsgBox "Field has no name; ID = " & objOneField.Id

    Else

        MsgBox "Field name = " & objOneField.Name

    End If

Next i

 

See Also

Field Object